﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame1.DungeonGames
{
    public enum TileType
    {
        Blocked,
        Entrance,
        Exit,
        Bombable,
        Flyable,
        Walkable,
        
        
        
    }
    public interface ITile
    {
        bool CanWalk { get; }
        bool IsEntrance { get; }
        bool IsExit { get; }
        bool IsBombable { get; }
        bool CanFly { get; }
    }
    public class Tile:ITile
    {
         TileType _tileType; //doors can be opened, bombable can become walkable
        public Tile(TileType tileType)
        {
            _tileType = tileType;
        }


        #region ITile Members

        public bool CanWalk
        {
            get { return _tileType == TileType.Walkable || IsEntrance || IsExit; }
        }

        public bool IsEntrance
        {
            get { return _tileType == TileType.Entrance; }
        }

        public bool IsExit
        {
            get { return _tileType == TileType.Exit; }
        }

        public bool IsBombable
        {
            get { return _tileType== TileType.Bombable; }
        }

        public bool CanFly
        {
            get { return _tileType== TileType.Flyable; }
        }

        #endregion
    }
}
